﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="AdminControlleft.ascx.cs" Inherits="UserControl_Controlleft" %>
                	
    <div class="block">
        <h2>Pesonal Info</h2>
        <ul>
            <li><a href="#"><i class="fa fa-angle-right"></i>Change Password</a></li>
            <li><a href="#"><i class="fa fa-angle-right"></i>Update Info</a></li>
        </ul>
    </div>

    <div class="block">
        <h2>SYSTEM</h2>
        <ul>
            <li><a href="#"><i class="fa fa-angle-right"></i>Menu top</a></li>
            <li><a href="#"><i class="fa fa-angle-right"></i>Menu left</a></li>
        </ul>
    </div>

    <div class="block">
        <h2>PAGE</h2>
        <ul id="content-box-tabs">
            <li><a href="#students" class="students nav-top-item" rel="students"><i class="fa fa-angle-right"></i>Students</a>
                <ul>
							<li>
								<a href="#">View infor</a>
							</li>
							<li>
								<a href="#">Add competition</a>
							</li>
							<li>
								<a href="#">Search and update</a>
							</li>
						</ul>
            </li>
            <li><a href="#manager" class="manager nav-top-item" rel="manager"><i class="fa fa-angle-right"></i>Manager</a>
                <ul>
					<li>
						<a href="#">link 0</a>
					</li>
					<li>
						<a href="#">link 1</a>
					</li>
				</ul>
            </li>            
            <li><a href="#competition" class="competition nav-top-item" rel="competition"><i class="fa fa-angle-right"></i>Competition</a>
                <ul>
							<li>
								<a href="#">View infor</a>
							</li>
							<li>
								<a href="#">Add competition</a>
							</li>
							<li>
								<a href="#">Search and update</a>
							</li>
						</ul>
            </li>
            <li><a href="#introduction" class="introduction nav-top-item" rel="introduction"><i class="fa fa-angle-right"></i>Introduction</a></li>
            <li><a href="#contact" class="contact nav-top-item" rel="contact"><i class="fa fa-angle-right"></i>Contact</a></li>
        </ul>

        <script>
            $(document).ready(function () {

                $('#content-box-tabs li ul').hide();
                $('#content-box-tabs li a.current').parent().find('ul').slideToggle('slow');
                // the cai duoi , 3 khi ma cai the a co class navtopitem click thi minh lam 1 loat dong tac do'
                $('#content-box-tabs li a.nav-top-item').click(
		            function () {
		                $(this).parent().siblings().find('ul').slideUp('normal'); // tim xem co nham` cho nay la dong cai ul lai
		                $(this).parent().siblings().find('a').removeClass('current'); //xoa cai class current hien tai di
		                //$('#main-nav li a.nav-top-item').removeClass('current');
		                $(this).next().slideToggle('normal'); //day moi la hien ra
		                $(this).addClass('current').fadeIn();
		                return false;
		            }
	            );
		            $('#content-box-tabs ul li a').click(
		            function () {
		                $('#content-box-tabs ul li a.current').removeClass('current'); 
		                $(this).addClass('current'); 
		                return false;
		            }
	            );

                //Content box tabs
                var self;
                self = this;
                self.init = function () {
                    var current_tab;
                    current_tab = window.location.hash;
                    if (current_tab.indexOf('#' !== -1)) {
                        current_tab = current_tab.substr(current_tab.indexOf('#') + 1, current_tab.length - 1);
                    } else {
                        current_tab = 'competition';
                    }
                    if (current_tab == '') {
                        current_tab = 'test';
                    }
                    self.switchTab(current_tab);
                    return true;
                };

                self.switchTab = function (tab) {
                    var $nav;
                    $nav = $('#content-box-tabs');
                    $('a', $nav).removeClass('current');
                    $('a.' + tab, $nav).addClass('current');
                    $('.tab-content').hide();
                    return $('#' + tab).slideDown();
                };

                $('#content-box-tabs a').live('click', function () {
                    var $t, tab;
                    $t = $(this);
                    tab = $t.attr('rel');
                    return self.switchTab(tab);
                });

                self.init();
            });
        </script>
    </div>

